<?php

	/**
	 * Synergy Front Controller
	 * 
	 * This file sets up the environment and launches the framework.
	 **/
	
	define('BASE_PATH', str_replace('fc.php','',__FILE__));
	set_include_path(
		get_include_path() . 
		':' . BASE_PATH . 'core' .
		':' . BASE_PATH . 'core/objectCache'
	);

	function __autoload($classname) {
		error_log("[SYNERGY - NOTICE] : Including {$classname}.class");
		
		/* Catches attempts to define controller objects so that we can
			insert our AOP advices */
		// $aopd = new SynergyAOPDaemon();
		// $classname = $aopd->weave($classname);

		require($classname . '.php');
	}

	$synergy = new Synergy();
	$synergy->output($_SERVER['REQUEST_URI']);

?>
